/*     */ package com.cr.web.controller.demo.controller;
/*     */ 
/*     */ import com.alibaba.fastjson.JSON;
/*     */ import com.cr.common.core.domain.AjaxResult;
/*     */ import com.cr.common.core.domain.CxSelect;
/*     */ import com.cr.common.json.JSONObject;
/*     */ import org.apache.commons.lang3.StringUtils;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ import org.springframework.stereotype.Controller;
/*     */ import org.springframework.ui.ModelMap;
/*     */ import org.springframework.web.bind.annotation.GetMapping;
/*     */ import org.springframework.web.bind.annotation.PostMapping;
/*     */ import org.springframework.web.bind.annotation.RequestMapping;
/*     */ import org.springframework.web.bind.annotation.ResponseBody;
/*     */ 
/*     */ @Controller
/*     */ @RequestMapping({"/demo/form"})
/*     */ public class DemoFormController {
/*     */   private String prefix;
/*     */   
/*     */   public DemoFormController() {
/*  27 */     this.prefix = "demo/form";
/*  31 */     users.add(new UserFormModel(1, "1000001", "测试1", "15888888888"));
/*  32 */     users.add(new UserFormModel(2, "1000002", "测试2", "15666666666"));
/*  33 */     users.add(new UserFormModel(3, "1000003", "测试3", "15666666666"));
/*  34 */     users.add(new UserFormModel(4, "1000004", "测试4", "15666666666"));
/*  35 */     users.add(new UserFormModel(5, "1000005", "测试5", "15666666666"));
/*     */   }
/*     */   
/*     */   private static final List<UserFormModel> users = new ArrayList<>();
/*     */   
/*     */   @GetMapping({"/button"})
/*     */   public String button() {
/*  44 */     return this.prefix + "/button";
/*     */   }
/*     */   
/*     */   @GetMapping({"/select"})
/*     */   public String select() {
/*  53 */     return this.prefix + "/select";
/*     */   }
/*     */   
/*     */   @GetMapping({"/timeline"})
/*     */   public String timeline() {
/*  62 */     return this.prefix + "/timeline";
/*     */   }
/*     */   
/*     */   @GetMapping({"/validate"})
/*     */   public String validate() {
/*  71 */     return this.prefix + "/validate";
/*     */   }
/*     */   
/*     */   @GetMapping({"/jasny"})
/*     */   public String jasny() {
/*  80 */     return this.prefix + "/jasny";
/*     */   }
/*     */   
/*     */   @GetMapping({"/sortable"})
/*     */   public String sortable() {
/*  89 */     return this.prefix + "/sortable";
/*     */   }
/*     */   
/*     */   @GetMapping({"/invoice"})
/*     */   public String invoice() {
/*  98 */     return this.prefix + "/invoice";
/*     */   }
/*     */   
/*     */   @GetMapping({"/labels_tips"})
/*     */   public String labels_tips() {
/* 107 */     return this.prefix + "/labels_tips";
/*     */   }
/*     */   
/*     */   @GetMapping({"/tabs_panels"})
/*     */   public String tabs_panels() {
/* 116 */     return this.prefix + "/tabs_panels";
/*     */   }
/*     */   
/*     */   @GetMapping({"/grid"})
/*     */   public String grid() {
/* 125 */     return this.prefix + "/grid";
/*     */   }
/*     */   
/*     */   @GetMapping({"/wizard"})
/*     */   public String wizard() {
/* 134 */     return this.prefix + "/wizard";
/*     */   }
/*     */   
/*     */   @GetMapping({"/upload"})
/*     */   public String upload() {
/* 143 */     return this.prefix + "/upload";
/*     */   }
/*     */   
/*     */   @GetMapping({"/datetime"})
/*     */   public String datetime() {
/* 152 */     return this.prefix + "/datetime";
/*     */   }
/*     */   
/*     */   @GetMapping({"/duallistbox"})
/*     */   public String duallistbox() {
/* 161 */     return this.prefix + "/duallistbox";
/*     */   }
/*     */   
/*     */   @GetMapping({"/basic"})
/*     */   public String basic() {
/* 170 */     return this.prefix + "/basic";
/*     */   }
/*     */   
/*     */   @GetMapping({"/cards"})
/*     */   public String cards() {
/* 179 */     return this.prefix + "/cards";
/*     */   }
/*     */   
/*     */   @GetMapping({"/summernote"})
/*     */   public String summernote() {
/* 188 */     return this.prefix + "/summernote";
/*     */   }
/*     */   
/*     */   @GetMapping({"/autocomplete"})
/*     */   public String autocomplete() {
/* 197 */     return this.prefix + "/autocomplete";
/*     */   }
/*     */   
/*     */   @GetMapping({"/cxselect"})
/*     */   public String cxselect(ModelMap mmap) {
/* 206 */     CxSelect cxSelectTB = new CxSelect();
/* 207 */     cxSelectTB.setN("淘宝");
/* 208 */     cxSelectTB.setV("taobao");
/* 209 */     CxSelect cxSelectTm = new CxSelect();
/* 210 */     cxSelectTm.setN("天猫");
/* 211 */     cxSelectTm.setV("tm");
/* 212 */     CxSelect cxSelectJhs = new CxSelect();
/* 213 */     cxSelectJhs.setN("聚划算");
/* 214 */     cxSelectJhs.setV("jhs");
/* 215 */     List<CxSelect> tmList = new ArrayList<>();
/* 216 */     tmList.add(cxSelectTm);
/* 217 */     tmList.add(cxSelectJhs);
/* 218 */     cxSelectTB.setS(tmList);
/* 220 */     CxSelect cxSelectJD = new CxSelect();
/* 221 */     cxSelectJD.setN("京东");
/* 222 */     cxSelectJD.setV("jd");
/* 223 */     CxSelect cxSelectCs = new CxSelect();
/* 224 */     cxSelectCs.setN("京东超市");
/* 225 */     cxSelectCs.setV("jdcs");
/* 226 */     CxSelect cxSelectSx = new CxSelect();
/* 227 */     cxSelectSx.setN("京东生鲜");
/* 228 */     cxSelectSx.setV("jdsx");
/* 229 */     List<CxSelect> jdList = new ArrayList<>();
/* 230 */     jdList.add(cxSelectCs);
/* 231 */     jdList.add(cxSelectSx);
/* 232 */     cxSelectJD.setS(jdList);
/* 234 */     List<CxSelect> cxList = new ArrayList<>();
/* 235 */     cxList.add(cxSelectTB);
/* 236 */     cxList.add(cxSelectJD);
/* 238 */     mmap.put("data", JSON.toJSON(cxList));
/* 239 */     return this.prefix + "/cxselect";
/*     */   }
/*     */   
/*     */   @GetMapping({"/localrefresh"})
/*     */   public String localRefresh(ModelMap mmap) {
/* 248 */     JSONObject.JSONArray list = new JSONObject.JSONArray();
/* 249 */     JSONObject item = new JSONObject();
/* 250 */     item.put("name", "这条任务数据是由ModelMap传递到页面的，点击添加按钮后会将这条数据替换为新数据");
/* 251 */     item.put("type", "默认");
/* 252 */     item.put("date", "2020.06.10");
/* 253 */     list.add(item);
/* 254 */     mmap.put("tasks", list);
/* 255 */     mmap.put("min", Integer.valueOf(2));
/* 256 */     mmap.put("max", Integer.valueOf(10));
/* 257 */     return this.prefix + "/localrefresh";
/*     */   }
/*     */   
/*     */   @PostMapping({"/localrefresh/task"})
/*     */   public String localRefreshTask(String fragment, String taskName, ModelMap mmap) {
/* 269 */     JSONObject.JSONArray list = new JSONObject.JSONArray();
/* 270 */     JSONObject item = new JSONObject();
/* 271 */     item.put("name", StringUtils.defaultIfBlank(taskName, "通过电话销售过程中了解各盛市的设备仪器使用、采购情况及相关重要追踪人"));
/* 272 */     item.put("type", "新增");
/* 273 */     item.put("date", "2018.06.10");
/* 274 */     list.add(item);
/* 275 */     item = new JSONObject();
/* 276 */     item.put("name", "提高自己电话营销技巧，灵活专业地与客户进行电话交流");
/* 277 */     item.put("type", "新增");
/* 278 */     item.put("date", "2018.06.12");
/* 279 */     list.add(item);
/* 280 */     mmap.put("tasks", list);
/* 281 */     return this.prefix + "/localrefresh::" + fragment;
/*     */   }
/*     */   
/*     */   @GetMapping({"/cityData"})
/*     */   @ResponseBody
/*     */   public String cityData() {
/* 291 */     String data = "[{\"n\":\"湖南省\",\"s\":[{\"n\":\"长沙市\",\"s\":[{\"n\":\"芙蓉区\"},{\"n\":\"天心区\"},{\"n\":\"岳麓区\"},{\"n\":\"开福区\"},{\"n\":\"雨花区\"},{\"n\":\"望城区\"},{\"n\":\"长沙县\"},{\"n\":\"宁乡县\"},{\"n\":\"浏阳市\"}]},{\"n\":\"株洲市\",\"s\":[{\"n\":\"荷塘区\"},{\"n\":\"芦淞区\"},{\"n\":\"石峰区\"},{\"n\":\"天元区\"},{\"n\":\"株洲县\"},{\"n\":\"攸县\"},{\"n\":\"茶陵县\"},{\"n\":\"炎陵县\"},{\"n\":\"醴陵市\"}]},{\"n\":\"湘潭市\",\"s\":[{\"n\":\"雨湖区\"},{\"n\":\"岳塘区\"},{\"n\":\"湘潭县\"},{\"n\":\"湘乡市\"},{\"n\":\"韶山市\"}]},{\"n\":\"衡阳市\",\"s\":[{\"n\":\"珠晖区\"},{\"n\":\"雁峰区\"},{\"n\":\"石鼓区\"},{\"n\":\"蒸湘区\"},{\"n\":\"南岳区\"},{\"n\":\"衡阳县\"},{\"n\":\"衡南县\"},{\"n\":\"衡山县\"},{\"n\":\"衡东县\"},{\"n\":\"祁东县\"},{\"n\":\"耒阳市\"},{\"n\":\"常宁市\"}]},{\"n\":\"邵阳市\",\"s\":[{\"n\":\"双清区\"},{\"n\":\"大祥区\"},{\"n\":\"北塔区\"},{\"n\":\"邵东县\"},{\"n\":\"新邵县\"},{\"n\":\"邵阳县\"},{\"n\":\"隆回县\"},{\"n\":\"洞口县\"},{\"n\":\"绥宁县\"},{\"n\":\"新宁县\"},{\"n\":\"城步苗族自治县\"},{\"n\":\"武冈市\"}]},{\"n\":\"岳阳市\",\"s\":[{\"n\":\"岳阳楼区\"},{\"n\":\"云溪区\"},{\"n\":\"君山区\"},{\"n\":\"岳阳县\"},{\"n\":\"华容县\"},{\"n\":\"湘阴县\"},{\"n\":\"平江县\"},{\"n\":\"汨罗市\"},{\"n\":\"临湘市\"}]},{\"n\":\"常德市\",\"s\":[{\"n\":\"武陵区\"},{\"n\":\"鼎城区\"},{\"n\":\"安乡县\"},{\"n\":\"汉寿县\"},{\"n\":\"澧县\"},{\"n\":\"临澧县\"},{\"n\":\"桃源县\"},{\"n\":\"石门县\"},{\"n\":\"津市市\"}]},{\"n\":\"张家界市\",\"s\":[{\"n\":\"永定区\"},{\"n\":\"武陵源区\"},{\"n\":\"慈利县\"},{\"n\":\"桑植县\"}]},{\"n\":\"益阳市\",\"s\":[{\"n\":\"资阳区\"},{\"n\":\"赫山区\"},{\"n\":\"南县\"},{\"n\":\"桃江县\"},{\"n\":\"安化县\"},{\"n\":\"沅江市\"}]},{\"n\":\"郴州市\",\"s\":[{\"n\":\"北湖区\"},{\"n\":\"苏仙区\"},{\"n\":\"桂阳县\"},{\"n\":\"宜章县\"},{\"n\":\"永兴县\"},{\"n\":\"嘉禾县\"},{\"n\":\"临武县\"},{\"n\":\"汝城县\"},{\"n\":\"桂东县\"},{\"n\":\"安仁县\"},{\"n\":\"资兴市\"}]},{\"n\":\"永州市\",\"s\":[{\"n\":\"零陵区\"},{\"n\":\"冷水滩区\"},{\"n\":\"祁阳县\"},{\"n\":\"东安县\"},{\"n\":\"双牌县\"},{\"n\":\"道县\"},{\"n\":\"江永县\"},{\"n\":\"宁远县\"},{\"n\":\"蓝山县\"},{\"n\":\"新田县\"},{\"n\":\"江华瑶族自治县\"}]},{\"n\":\"怀化市\",\"s\":[{\"n\":\"鹤城区\"},{\"n\":\"中方县\"},{\"n\":\"沅陵县\"},{\"n\":\"辰溪县\"},{\"n\":\"溆浦县\"},{\"n\":\"会同县\"},{\"n\":\"麻阳苗族自治县\"},{\"n\":\"新晃侗族自治县\"},{\"n\":\"芷江侗族自治县\"},{\"n\":\"靖州苗族侗族自治县\"},{\"n\":\"通道侗族自治县\"},{\"n\":\"洪江市\"}]},{\"n\":\"娄底市\",\"s\":[{\"n\":\"娄星区\"},{\"n\":\"双峰县\"},{\"n\":\"新化县\"},{\"n\":\"冷水江市\"},{\"n\":\"涟源市\"}]},{\"n\":\"湘西土家族苗族自治州\",\"s\":[{\"n\":\"吉首市\"},{\"n\":\"泸溪县\"},{\"n\":\"凤凰县\"},{\"n\":\"花垣县\"},{\"n\":\"保靖县\"},{\"n\":\"古丈县\"},{\"n\":\"永顺县\"},{\"n\":\"龙山县\"}]}]},{\"n\":\"广东省\",\"s\":[{\"n\":\"广州市\",\"s\":[{\"n\":\"荔湾区\"},{\"n\":\"越秀区\"},{\"n\":\"海珠区\"},{\"n\":\"天河区\"},{\"n\":\"白云区\"},{\"n\":\"黄埔区\"},{\"n\":\"番禺区\"},{\"n\":\"花都区\"},{\"n\":\"南沙区\"},{\"n\":\"萝岗区\"},{\"n\":\"增城市\"},{\"n\":\"从化市\"}]},{\"n\":\"韶关市\",\"s\":[{\"n\":\"武江区\"},{\"n\":\"浈江区\"},{\"n\":\"曲江区\"},{\"n\":\"始兴县\"},{\"n\":\"仁化县\"},{\"n\":\"翁源县\"},{\"n\":\"乳源瑶族自治县\"},{\"n\":\"新丰县\"},{\"n\":\"乐昌市\"},{\"n\":\"南雄市\"}]},{\"n\":\"深圳市\",\"s\":[{\"n\":\"罗湖区\"},{\"n\":\"福田区\"},{\"n\":\"南山区\"},{\"n\":\"宝安区\"},{\"n\":\"龙岗区\"},{\"n\":\"盐田区\"}]},{\"n\":\"珠海市\",\"s\":[{\"n\":\"香洲区\"},{\"n\":\"斗门区\"},{\"n\":\"金湾区\"}]},{\"n\":\"汕头市\",\"s\":[{\"n\":\"龙湖区\"},{\"n\":\"金平区\"},{\"n\":\"濠江区\"},{\"n\":\"潮阳区\"},{\"n\":\"潮南区\"},{\"n\":\"澄海区\"},{\"n\":\"南澳县\"}]},{\"n\":\"佛山市\",\"s\":[{\"n\":\"禅城区\"},{\"n\":\"南海区\"},{\"n\":\"顺德区\"},{\"n\":\"三水区\"},{\"n\":\"高明区\"}]},{\"n\":\"江门市\",\"s\":[{\"n\":\"蓬江区\"},{\"n\":\"江海区\"},{\"n\":\"新会区\"},{\"n\":\"台山市\"},{\"n\":\"开平市\"},{\"n\":\"鹤山市\"},{\"n\":\"恩平市\"}]},{\"n\":\"湛江市\",\"s\":[{\"n\":\"赤坎区\"},{\"n\":\"霞山区\"},{\"n\":\"坡头区\"},{\"n\":\"麻章区\"},{\"n\":\"遂溪县\"},{\"n\":\"徐闻县\"},{\"n\":\"廉江市\"},{\"n\":\"雷州市\"},{\"n\":\"吴川市\"}]},{\"n\":\"茂名市\",\"s\":[{\"n\":\"茂南区\"},{\"n\":\"茂港区\"},{\"n\":\"电白县\"},{\"n\":\"高州市\"},{\"n\":\"化州市\"},{\"n\":\"信宜市\"}]},{\"n\":\"肇庆市\",\"s\":[{\"n\":\"端州区\"},{\"n\":\"鼎湖区\"},{\"n\":\"广宁县\"},{\"n\":\"怀集县\"},{\"n\":\"封开县\"},{\"n\":\"德庆县\"},{\"n\":\"高要市\"},{\"n\":\"四会市\"}]},{\"n\":\"惠州市\",\"s\":[{\"n\":\"惠城区\"},{\"n\":\"惠阳区\"},{\"n\":\"博罗县\"},{\"n\":\"惠东县\"},{\"n\":\"龙门县\"}]},{\"n\":\"梅州市\",\"s\":[{\"n\":\"梅江区\"},{\"n\":\"梅县\"},{\"n\":\"大埔县\"},{\"n\":\"丰顺县\"},{\"n\":\"五华县\"},{\"n\":\"平远县\"},{\"n\":\"蕉岭县\"},{\"n\":\"兴宁市\"}]},{\"n\":\"汕尾市\",\"s\":[{\"n\":\"城区\"},{\"n\":\"海丰县\"},{\"n\":\"陆河县\"},{\"n\":\"陆丰市\"}]},{\"n\":\"河源市\",\"s\":[{\"n\":\"源城区\"},{\"n\":\"紫金县\"},{\"n\":\"龙川县\"},{\"n\":\"连平县\"},{\"n\":\"和平县\"},{\"n\":\"东源县\"}]},{\"n\":\"阳江市\",\"s\":[{\"n\":\"江城区\"},{\"n\":\"阳西县\"},{\"n\":\"阳东县\"},{\"n\":\"阳春市\"}]},{\"n\":\"清远市\",\"s\":[{\"n\":\"清城区\"},{\"n\":\"清新区\"},{\"n\":\"佛冈县\"},{\"n\":\"阳山县\"},{\"n\":\"连山壮族瑶族自治县\"},{\"n\":\"连南瑶族自治县\"},{\"n\":\"英德市\"},{\"n\":\"连州市\"}]},{\"n\":\"东莞市\"},{\"n\":\"中山市\"},{\"n\":\"潮州市\",\"s\":[{\"n\":\"湘桥区\"},{\"n\":\"潮安区\"},{\"n\":\"饶平县\"}]},{\"n\":\"揭阳市\",\"s\":[{\"n\":\"榕城区\"},{\"n\":\"揭东区\"},{\"n\":\"揭西县\"},{\"n\":\"惠来县\"},{\"n\":\"普宁市\"}]},{\"n\":\"云浮市\",\"s\":[{\"n\":\"云城区\"},{\"n\":\"新兴县\"},{\"n\":\"郁南县\"},{\"n\":\"云安县\"},{\"n\":\"罗定市\"}]}]}]";
/* 292 */     return data;
/*     */   }
/*     */   
/*     */   @GetMapping({"/userModel"})
/*     */   @ResponseBody
/*     */   public AjaxResult userModel() {
/* 302 */     AjaxResult ajax = new AjaxResult();
/* 304 */     ajax.put("code", Integer.valueOf(200));
/* 305 */     ajax.put("value", users);
/* 306 */     return ajax;
/*     */   }
/*     */   
/*     */   @GetMapping({"/collection"})
/*     */   @ResponseBody
/*     */   public AjaxResult collection() {
/* 316 */     String[] array = { "ruoyi 1", "ruoyi 2", "ruoyi 3", "ruoyi 4", "ruoyi 5" };
/* 317 */     AjaxResult ajax = new AjaxResult();
/* 318 */     ajax.put("value", array);
/* 319 */     return ajax;
/*     */   }
/*     */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\classes\com.zip!\com\cr\web\controller\demo\controller\DemoFormController.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */